{
  "cells": [
    {
      "cell_type": "markdown",
      "source": [
        "# Stochastic Gradient Descent (SGD) Regression"
      ],
      "metadata": {}
    },
    {
      "cell_type": "markdown",
      "source": [
        "Stochastic Gradient Descent (SGD) is an algorithm that is simple, but very efficient approach to fitting linear classifiers and regressors under convex loss functions such as (linear) Support Vector Machines and Logistic Regression."
      ],
      "metadata": {
        "nteract": {
          "transient": {
            "deleting": false
          }
        }
      }
    },
    {
      "cell_type": "code",
      "source": [
        "import numpy as np\n",
        "import matplotlib.pyplot as plt\n",
        "import pandas as pd\n",
        "\n",
        "import warnings\n",
        "warnings.filterwarnings(\"ignore\")\n",
        "\n",
        "# yahoo finance is used to fetch data \n",
        "import yfinance as yf\n",
        "yf.pdr_override()"
      ],
      "outputs": [],
      "execution_count": 1,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false,
        "execution": {
          "iopub.status.busy": "2021-09-14T01:02:46.446Z",
          "iopub.execute_input": "2021-09-14T01:02:46.451Z",
          "shell.execute_reply": "2021-09-14T01:02:46.479Z",
          "iopub.status.idle": "2021-09-14T01:02:46.458Z"
        }
      }
    },
    {
      "cell_type": "code",
      "source": [
        "# input\n",
        "symbol = 'AMD'\n",
        "start = '2014-01-01'\n",
        "end = '2018-08-27'\n",
        "\n",
        "# Read data \n",
        "dataset = yf.download(symbol,start,end)\n",
        "\n",
        "# View Columns\n",
        "dataset.head()"
      ],
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "[*********************100%***********************]  1 of 1 completed\n"
          ]
        },
        {
          "output_type": "execute_result",
          "execution_count": 2,
          "data": {
            "text/plain": "            Open  High   Low  Close  Adj Close    Volume\nDate                                                    \n2014-01-02  3.85  3.98  3.84   3.95       3.95  20548400\n2014-01-03  3.98  4.00  3.88   4.00       4.00  22887200\n2014-01-06  4.01  4.18  3.99   4.13       4.13  42398300\n2014-01-07  4.19  4.25  4.11   4.18       4.18  42932100\n2014-01-08  4.23  4.26  4.14   4.18       4.18  30678700",
            "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>Open</th>\n      <th>High</th>\n      <th>Low</th>\n      <th>Close</th>\n      <th>Adj Close</th>\n      <th>Volume</th>\n    </tr>\n    <tr>\n      <th>Date</th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>2014-01-02</th>\n      <td>3.85</td>\n      <td>3.98</td>\n      <td>3.84</td>\n      <td>3.95</td>\n      <td>3.95</td>\n      <td>20548400</td>\n    </tr>\n    <tr>\n      <th>2014-01-03</th>\n      <td>3.98</td>\n      <td>4.00</td>\n      <td>3.88</td>\n      <td>4.00</td>\n      <td>4.00</td>\n      <td>22887200</td>\n    </tr>\n    <tr>\n      <th>2014-01-06</th>\n      <td>4.01</td>\n      <td>4.18</td>\n      <td>3.99</td>\n      <td>4.13</td>\n      <td>4.13</td>\n      <td>42398300</td>\n    </tr>\n    <tr>\n      <th>2014-01-07</th>\n      <td>4.19</td>\n      <td>4.25</td>\n      <td>4.11</td>\n      <td>4.18</td>\n      <td>4.18</td>\n      <td>42932100</td>\n    </tr>\n    <tr>\n      <th>2014-01-08</th>\n      <td>4.23</td>\n      <td>4.26</td>\n      <td>4.14</td>\n      <td>4.18</td>\n      <td>4.18</td>\n      <td>30678700</td>\n    </tr>\n  </tbody>\n</table>\n</div>"
          },
          "metadata": {}
        }
      ],
      "execution_count": 2,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false,
        "execution": {
          "iopub.status.busy": "2021-09-14T01:02:46.465Z",
          "iopub.execute_input": "2021-09-14T01:02:46.470Z",
          "iopub.status.idle": "2021-09-14T01:02:47.162Z",
          "shell.execute_reply": "2021-09-14T01:02:47.195Z"
        }
      }
    },
    {
      "cell_type": "code",
      "source": [
        "# Create more data\n",
        "dataset['Increase_Decrease'] = np.where(dataset['Volume'].shift(-1) > dataset['Volume'],1,0)\n",
        "dataset['Buy_Sell_on_Open'] = np.where(dataset['Open'].shift(-1) > dataset['Open'],1,-1)\n",
        "dataset['Buy_Sell'] = np.where(dataset['Adj Close'].shift(-1) > dataset['Adj Close'],1,-1)\n",
        "dataset['Return'] = dataset['Adj Close'].pct_change()\n",
        "dataset = dataset.dropna()\n",
        "dataset.head()"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 3,
          "data": {
            "text/plain": "            Open  High   Low  Close  Adj Close    Volume  Increase_Decrease  \\\nDate                                                                          \n2014-01-03  3.98  4.00  3.88   4.00       4.00  22887200                  1   \n2014-01-06  4.01  4.18  3.99   4.13       4.13  42398300                  1   \n2014-01-07  4.19  4.25  4.11   4.18       4.18  42932100                  0   \n2014-01-08  4.23  4.26  4.14   4.18       4.18  30678700                  0   \n2014-01-09  4.20  4.23  4.05   4.09       4.09  30667600                  0   \n\n            Buy_Sell_on_Open  Buy_Sell    Return  \nDate                                              \n2014-01-03                 1         1  0.012658  \n2014-01-06                 1         1  0.032500  \n2014-01-07                 1        -1  0.012106  \n2014-01-08                -1        -1  0.000000  \n2014-01-09                -1         1 -0.021531  ",
            "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>Open</th>\n      <th>High</th>\n      <th>Low</th>\n      <th>Close</th>\n      <th>Adj Close</th>\n      <th>Volume</th>\n      <th>Increase_Decrease</th>\n      <th>Buy_Sell_on_Open</th>\n      <th>Buy_Sell</th>\n      <th>Return</th>\n    </tr>\n    <tr>\n      <th>Date</th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>2014-01-03</th>\n      <td>3.98</td>\n      <td>4.00</td>\n      <td>3.88</td>\n      <td>4.00</td>\n      <td>4.00</td>\n      <td>22887200</td>\n      <td>1</td>\n      <td>1</td>\n      <td>1</td>\n      <td>0.012658</td>\n    </tr>\n    <tr>\n      <th>2014-01-06</th>\n      <td>4.01</td>\n      <td>4.18</td>\n      <td>3.99</td>\n      <td>4.13</td>\n      <td>4.13</td>\n      <td>42398300</td>\n      <td>1</td>\n      <td>1</td>\n      <td>1</td>\n      <td>0.032500</td>\n    </tr>\n    <tr>\n      <th>2014-01-07</th>\n      <td>4.19</td>\n      <td>4.25</td>\n      <td>4.11</td>\n      <td>4.18</td>\n      <td>4.18</td>\n      <td>42932100</td>\n      <td>0</td>\n      <td>1</td>\n      <td>-1</td>\n      <td>0.012106</td>\n    </tr>\n    <tr>\n      <th>2014-01-08</th>\n      <td>4.23</td>\n      <td>4.26</td>\n      <td>4.14</td>\n      <td>4.18</td>\n      <td>4.18</td>\n      <td>30678700</td>\n      <td>0</td>\n      <td>-1</td>\n      <td>-1</td>\n      <td>0.000000</td>\n    </tr>\n    <tr>\n      <th>2014-01-09</th>\n      <td>4.20</td>\n      <td>4.23</td>\n      <td>4.05</td>\n      <td>4.09</td>\n      <td>4.09</td>\n      <td>30667600</td>\n      <td>0</td>\n      <td>-1</td>\n      <td>1</td>\n      <td>-0.021531</td>\n    </tr>\n  </tbody>\n</table>\n</div>"
          },
          "metadata": {}
        }
      ],
      "execution_count": 3,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false,
        "execution": {
          "iopub.status.busy": "2021-09-14T01:02:47.170Z",
          "iopub.execute_input": "2021-09-14T01:02:47.175Z",
          "shell.execute_reply": "2021-09-14T01:02:47.199Z",
          "iopub.status.idle": "2021-09-14T01:02:47.204Z"
        }
      }
    },
    {
      "cell_type": "code",
      "source": [
        "dataset.shape"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 4,
          "data": {
            "text/plain": "(1170, 10)"
          },
          "metadata": {}
        }
      ],
      "execution_count": 4,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false,
        "execution": {
          "iopub.status.busy": "2021-09-14T01:02:47.211Z",
          "iopub.execute_input": "2021-09-14T01:02:47.216Z",
          "iopub.status.idle": "2021-09-14T01:02:47.227Z",
          "shell.execute_reply": "2021-09-14T01:02:47.289Z"
        }
      }
    },
    {
      "cell_type": "code",
      "source": [
        "X = dataset['Open']\n",
        "y = dataset['Adj Close'] "
      ],
      "outputs": [],
      "execution_count": 5,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false,
        "execution": {
          "iopub.status.busy": "2021-09-14T01:02:47.233Z",
          "iopub.execute_input": "2021-09-14T01:02:47.238Z",
          "iopub.status.idle": "2021-09-14T01:02:47.246Z",
          "shell.execute_reply": "2021-09-14T01:02:47.293Z"
        }
      }
    },
    {
      "cell_type": "code",
      "source": [
        "X = np.array(X).reshape(1170,-1)\n",
        "y = np.array(y).reshape(1170,-1)"
      ],
      "outputs": [],
      "execution_count": 6,
      "metadata": {
        "collapsed": true,
        "jupyter": {
          "source_hidden": false,
          "outputs_hidden": false
        },
        "nteract": {
          "transient": {
            "deleting": false
          }
        },
        "execution": {
          "iopub.status.busy": "2021-09-14T01:02:47.254Z",
          "iopub.execute_input": "2021-09-14T01:02:47.259Z",
          "iopub.status.idle": "2021-09-14T01:02:47.266Z",
          "shell.execute_reply": "2021-09-14T01:02:47.296Z"
        }
      }
    },
    {
      "cell_type": "code",
      "source": [
        "from sklearn.linear_model import SGDRegressor\n",
        "from sklearn.model_selection import cross_val_score\n",
        "from sklearn.model_selection import RepeatedKFold\n",
        "from numpy import absolute, arange"
      ],
      "outputs": [],
      "execution_count": 7,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false,
        "execution": {
          "iopub.status.busy": "2021-09-14T01:02:47.273Z",
          "iopub.execute_input": "2021-09-14T01:02:47.278Z",
          "shell.execute_reply": "2021-09-14T01:02:47.508Z",
          "iopub.status.idle": "2021-09-14T01:02:47.503Z"
        }
      }
    },
    {
      "cell_type": "code",
      "source": [
        "# Define the model\n",
        "model = SGDRegressor()\n",
        "# Define model evaluation\n",
        "cv = RepeatedKFold(n_splits=10, n_repeats=3, random_state=1)\n",
        "# Evaluate model\n",
        "scores = cross_val_score(model, X, y, scoring='neg_mean_absolute_error', cv=cv, n_jobs=-1)\n",
        "# Change scores to be positive\n",
        "scores = absolute(scores)\n",
        " "
      ],
      "outputs": [],
      "execution_count": 8,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false,
        "execution": {
          "iopub.status.busy": "2021-09-14T01:02:47.533Z",
          "iopub.execute_input": "2021-09-14T01:02:47.540Z",
          "shell.execute_reply": "2021-09-14T01:02:51.941Z",
          "iopub.status.idle": "2021-09-14T01:02:51.948Z"
        }
      }
    },
    {
      "cell_type": "code",
      "source": [
        "model.fit(X, y)\n",
        "plt.scatter(X,y)\n",
        "xaxis = arange(X.min(), X.max(), 0.01)\n",
        "y_pred = model.predict(xaxis.reshape((len(xaxis), 1)))\n",
        "plt.plot(xaxis, y_pred, color='r')\n",
        "plt.title('Theil Sen Regression for Stock Price')\n",
        "plt.show()"
      ],
      "outputs": [
        {
          "output_type": "display_data",
          "data": {
            "text/plain": "<Figure size 432x288 with 1 Axes>",
            "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAEICAYAAABPgw/pAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAA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LJIrLV/l6hONtYXFy8Ngkikmp/ftaISLfibGNxEZFaIrJQRDaJyEYRedzerp8dmwb0otPBGNNc82UBmA7kvlfgcGC+MaYBMN/+ORRNJ+9rA/CK/flpboz5rojb5C/OAkOMMY2B1sAjInIx+tk5RwO6KnLGmMXAwVybbwbetx+/D/Qo0kb5CRevjQKMMWnGmFX242PAJiAW/eycowG9aBggSURWisiA4m6Mn6pqjEkD6xcXqFLM7fE3g0VknT0kE7JDCtlEpA7QAliOfnbO0YBeNNoYYy4Drsf6N/Ga4m6QCiiTgfpAcyANeKl4m1O8RKQM8AXwhDHmaHG3x59oQC8Cxpg99vd9wJdAq+JtkV/aKyLVAezv+4q5PX7DGLPXGJNpjMkC3iaEPz8iEokVzGcaY2bbm/WzY9OA7mMiUlpEymY/BroAG9yfFZLmAPfaj+8FvirGtviV7GBlu4UQ/fyIiADTgE3GmJcddulnx6YzRX1MROph9crBuin3R8aY8cXYpGInIrOA9ljLnu4FRgOJwKdAHLAT6G2MCbmLgy5em/ZYwy0G2A48lD1mHEpEpC3wI7AeyLI3j8QaRw/5zw5oQFdKqaChQy5KKRUkNKArpVSQ0ICulFJBQgO6UkoFCQ3oSikVJDSgK6VUkNCArpRSQeL/AaTH0zDhk2U+AAAAAElFTkSuQmCC\n"
          },
          "metadata": {
            "needs_background": "light"
          }
        }
      ],
      "execution_count": 9,
      "metadata": {
        "collapsed": true,
        "jupyter": {
          "source_hidden": false,
          "outputs_hidden": false
        },
        "nteract": {
          "transient": {
            "deleting": false
          }
        },
        "execution": {
          "iopub.status.busy": "2021-09-14T01:02:51.955Z",
          "iopub.execute_input": "2021-09-14T01:02:51.959Z",
          "shell.execute_reply": "2021-09-14T01:02:52.018Z",
          "iopub.status.idle": "2021-09-14T01:02:52.024Z"
        }
      }
    },
    {
      "cell_type": "code",
      "source": [
        "def evaluate_model(X, y, model):\n",
        "\t# Define model evaluation\n",
        "\tcv = RepeatedKFold(n_splits=10, n_repeats=3, random_state=1)\n",
        "\t# Evaluate model\n",
        "\tscores = cross_val_score(model, X, y, scoring='neg_mean_absolute_error', cv=cv, n_jobs=-1)\n",
        "\t# Scores to be positive\n",
        "\treturn absolute(scores)"
      ],
      "outputs": [],
      "execution_count": 10,
      "metadata": {
        "collapsed": true,
        "jupyter": {
          "source_hidden": false,
          "outputs_hidden": false
        },
        "nteract": {
          "transient": {
            "deleting": false
          }
        },
        "execution": {
          "iopub.status.busy": "2021-09-14T01:02:52.030Z",
          "iopub.execute_input": "2021-09-14T01:02:52.034Z",
          "iopub.status.idle": "2021-09-14T01:02:52.042Z",
          "shell.execute_reply": "2021-09-14T01:02:52.052Z"
        }
      }
    },
    {
      "cell_type": "code",
      "source": [
        "results = evaluate_model(X, y, model) \n",
        "print('Average MAE: %.3f (%.3f)' % (results.mean(), results.std())) "
      ],
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Average MAE: 0.155 (0.023)\n"
          ]
        }
      ],
      "execution_count": 11,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false,
        "execution": {
          "iopub.status.busy": "2021-09-14T01:02:52.071Z",
          "iopub.execute_input": "2021-09-14T01:02:52.078Z",
          "iopub.status.idle": "2021-09-14T01:02:56.483Z",
          "shell.execute_reply": "2021-09-14T01:02:56.613Z"
        }
      }
    },
    {
      "cell_type": "code",
      "source": [
        "model.coef_"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 12,
          "data": {
            "text/plain": "array([0.99365964])"
          },
          "metadata": {}
        }
      ],
      "execution_count": 12,
      "metadata": {
        "collapsed": true,
        "jupyter": {
          "source_hidden": false,
          "outputs_hidden": false
        },
        "nteract": {
          "transient": {
            "deleting": false
          }
        },
        "execution": {
          "iopub.status.busy": "2021-09-14T01:02:56.490Z",
          "iopub.execute_input": "2021-09-14T01:02:56.496Z",
          "iopub.status.idle": "2021-09-14T01:02:56.507Z",
          "shell.execute_reply": "2021-09-14T01:02:56.618Z"
        }
      }
    },
    {
      "cell_type": "code",
      "source": [
        "model.intercept_"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 13,
          "data": {
            "text/plain": "array([0.0004363])"
          },
          "metadata": {}
        }
      ],
      "execution_count": 13,
      "metadata": {
        "collapsed": true,
        "jupyter": {
          "source_hidden": false,
          "outputs_hidden": false
        },
        "nteract": {
          "transient": {
            "deleting": false
          }
        },
        "execution": {
          "iopub.status.busy": "2021-09-14T01:02:56.514Z",
          "iopub.execute_input": "2021-09-14T01:02:56.519Z",
          "iopub.status.idle": "2021-09-14T01:02:56.532Z",
          "shell.execute_reply": "2021-09-14T01:02:56.623Z"
        }
      }
    },
    {
      "cell_type": "code",
      "source": [
        "model.predict(y)"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 14,
          "data": {
            "text/plain": "array([ 3.97507486,  4.10425073,  4.15393342, ..., 20.76792241,\n       22.1491106 , 23.82839402])"
          },
          "metadata": {}
        }
      ],
      "execution_count": 14,
      "metadata": {
        "collapsed": true,
        "jupyter": {
          "source_hidden": false,
          "outputs_hidden": false
        },
        "nteract": {
          "transient": {
            "deleting": false
          }
        },
        "execution": {
          "iopub.status.busy": "2021-09-14T01:02:56.541Z",
          "iopub.execute_input": "2021-09-14T01:02:56.546Z",
          "iopub.status.idle": "2021-09-14T01:02:56.555Z",
          "shell.execute_reply": "2021-09-14T01:02:56.627Z"
        }
      }
    },
    {
      "cell_type": "code",
      "source": [
        "from sklearn.metrics import r2_score \n",
        "r2_score(X,y)"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 15,
          "data": {
            "text/plain": "0.9976522993458272"
          },
          "metadata": {}
        }
      ],
      "execution_count": 15,
      "metadata": {
        "collapsed": true,
        "jupyter": {
          "source_hidden": false,
          "outputs_hidden": false
        },
        "nteract": {
          "transient": {
            "deleting": false
          }
        },
        "execution": {
          "iopub.status.busy": "2021-09-14T01:02:56.562Z",
          "iopub.execute_input": "2021-09-14T01:02:56.566Z",
          "iopub.status.idle": "2021-09-14T01:02:56.577Z",
          "shell.execute_reply": "2021-09-14T01:02:56.633Z"
        }
      }
    },
    {
      "cell_type": "code",
      "source": [
        "from sklearn.metrics import mean_squared_error\n",
        "mean_squared_error(X, y)"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 16,
          "data": {
            "text/plain": "0.05530453347857824"
          },
          "metadata": {}
        }
      ],
      "execution_count": 16,
      "metadata": {
        "collapsed": true,
        "jupyter": {
          "source_hidden": false,
          "outputs_hidden": false
        },
        "nteract": {
          "transient": {
            "deleting": false
          }
        },
        "execution": {
          "iopub.status.busy": "2021-09-14T01:02:56.584Z",
          "iopub.execute_input": "2021-09-14T01:02:56.588Z",
          "shell.execute_reply": "2021-09-14T01:02:56.637Z",
          "iopub.status.idle": "2021-09-14T01:02:56.600Z"
        }
      }
    }
  ],
  "metadata": {
    "kernel_info": {
      "name": "python3"
    },
    "language_info": {
      "name": "python",
      "version": "3.6.13",
      "mimetype": "text/x-python",
      "codemirror_mode": {
        "name": "ipython",
        "version": 3
      },
      "pygments_lexer": "ipython3",
      "nbconvert_exporter": "python",
      "file_extension": ".py"
    },
    "kernelspec": {
      "name": "python3",
      "language": "python",
      "display_name": "Python 3"
    },
    "nteract": {
      "version": "0.28.0"
    }
  },
  "nbformat": 4,
  "nbformat_minor": 4
}